aboutsummaryrefslogtreecommitdiffstats
path: root/pages/api/notes/[id].js
diff options
context:
space:
mode:
authorGravatar piotrruss <mail@pruss.it> 2021-09-24 22:51:34 +0200
committerGravatar piotrruss <mail@pruss.it> 2021-09-24 22:51:34 +0200
commitaac64c2b068e937f939cdefed7af4f08bcb8b3eb (patch)
tree03927bc78bd5ec12d421bb209d1bb2502499059c /pages/api/notes/[id].js
parent3f95d1aaf4c6631b1f224fb4329cb855734d317e (diff)
downloadmy_apps-aac64c2b068e937f939cdefed7af4f08bcb8b3eb.tar.gz
my_apps-aac64c2b068e937f939cdefed7af4f08bcb8b3eb.tar.bz2
my_apps-aac64c2b068e937f939cdefed7af4f08bcb8b3eb.zip
send notes as plain/text
Diffstat (limited to 'pages/api/notes/[id].js')
-rw-r--r--pages/api/notes/[id].js2
1 files changed, 1 insertions, 1 deletions
diff --git a/pages/api/notes/[id].js b/pages/api/notes/[id].js
index a2cd680..5099f4f 100644
--- a/pages/api/notes/[id].js
+++ b/pages/api/notes/[id].js
@@ -54,7 +54,7 @@ export default withSession(async (req, res) => {
try {
const session = await conn.startSession()
const user = req.session.get('user')
- const { title, noteId, content } = req.body
+ const { title, noteId, content } = JSON.parse(req.body)
if (!user || !user?.isVerified || !_id || !content) {
throw new Error('Something went wrong')